package com.gec.hawaste.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

//专门用来负责跳转thyemleaf页面
@Controller
//@RequestMapping(value = "/")//控制将来如果需要父路径可以来设置
public class SysController {
      //http://localhost:8080/index.html
    //跳转一级目录
    @GetMapping(value = "{url}.html")
    public String page1(@PathVariable("url") String url){

        return url;
    }

    //http://localhost:8080/manager/index.html
    //跳转二级目录
    @GetMapping(value = "{moudle}/{url}.html")
    public String page2(@PathVariable("moudle") String moudle
            ,@PathVariable("url") String url){


        return moudle+"/"+url;
    }
    //http://localhost:8080/manager/app/app.html
    //跳转三级目录
    @GetMapping(value = "{moudle}/{classfiy}/{url}.html")
    public String page3(@PathVariable("moudle") String moudle
            ,@PathVariable("classfiy")String classfiy
            ,@PathVariable("url") String url){


        return moudle+"/"+classfiy+"/"+url;

    }
}
